<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Session;

class UserMiddleware
{
    public function handle($request, Closure $next)
    {
        if(Session::has('userModel')){
            return $next($request);
        }
        return '此操作需要用户 '." <a href=".url('login').">登录</a>";
    }
}
